package com.gw.quotes.net;

import java.io.Serializable;

public class Response<T> implements Serializable {

	public static final int RESULT_DEFAULT = -1;
	public static final int RESULT_ERROR = 0;
	public static final int RESULT_SUCCESS = 1;
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 结果码
	 */
	protected int result=RESULT_SUCCESS;

	/**
	 * 结果信息
	 */
	protected String msg;
	/**
	 * 结果对象
	 */
	protected T obj;

	public int getResult() {
		return result;
	}

	public void setResult(int result) {
		this.result = result;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
	public T getObj() {
		return obj;
	}

	public void setObj(T obj) {
		this.obj = obj;
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("result =").append(result).append("\r\n");
		sb.append("msg =").append(msg).append("\r\n");
		sb.append("obj =").append(obj).append("\r\n");
		return sb.toString();
	}

	
}
